<!DOCTYPE html>
<html>

{% load staticfiles %}

<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <title>
        Lighten -
        {# title #}
        {% block title %}{% endblock %}
        {# title #}
    </title>

    <link rel="stylesheet" type="text/css" href="{% static 'css/reset.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static 'css/animate.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static 'css/style.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static 'js/plugins/queryCity/css/cityLayout.css' %}">

    {# custom_css #}
    {% block custom_css %}{% endblock %}
    {# custom_css #}

    <script src="{% static 'js/jquery.min.js' %}" type="text/javascript"></script>
    <script src="{% static 'js/jquery-migrate-1.2.1.min.js' %}" type="text/javascript"></script>

    {# javascript link #}
    {% block javascript %}{% endblock %}
    {# javascript link #}
</head>

<body>

{# 登陆栏、搜索、导航条 #}
<section class="headerwrap {% block is_headerwrap2 %}{% endblock %}">
    <header>
        <div class="header {% block is_header2 %}{% endblock %}">
            {# 首行 #}
            <div class="top">
                <div class="wp">
                    <div class="fl"><p>服务电话：<b>23333331</b></p></div>
                    {% if not request.user.is_authenticated %}
                        <a style="color:white" class="fr registerbtn" href="{% url 'register' %}">注册</a>
                        <a style="color:white" class="fr loginbtn" href="{% url 'login' %}">登录</a>
                    {% else %}
                        <div class="personal">
                            <dl class="user fr">
                                <dd>{{ request.user.email }}<img class="down fr" src="{% static 'images/top_down.png' %}"/></dd>
                                <dt><img width="20" height="20" src="{{ MEDIA_URL }}{{ request.user.image }}"/>
                                </dt>
                            </dl>
                            <div class="userdetail">
                                <dl>
                                    <dt><img width="80" height="80"
                                             src="{{ MEDIA_URL }}{{ request.user.image }}"/>
                                    </dt>
                                    <dd>
                                        <h2>{{ request.user.nickname }}</h2>
                                        <p>{{ request.user.username }}</p>
                                    </dd>
                                </dl>
                                <div class="btn">
                                    <a class="personcenter fl" href="{% url 'user:user_info' %}">进入个人中心</a>
                                    <a class="fr" href="{% url 'logout' %}">退出</a>
                                </div>
                            </div>
                        </div>
                        <a href="{% url 'user:messages' %}">
                            <div class="msg-num"><span id="MsgNum">{{ request.user.unread_nums }}</span></div>
                        </a>
                    {% endif %}
                </div>
            </div>

            {# 搜索框与导航 #}
            {% block head_middle_nav %}
                {# 搜索框 #}
                <div class="middle">
                    <div class="wp">
                        <a href="{% url 'index' %}"><img class="fl" src="{% static 'images/logo.png' %}"/></a>
                        <div class="searchbox fr">
                            <div class="selectContainer fl">
                            <span class="selectOption" id="jsSelectOption" data-value="course">
                                公开课
                            </span>
                                <ul class="selectMenu" id="jsSelectMenu">
                                    <li data-value="course">公开课</li>
                                    <li data-value="org">课程机构</li>
                                    <li data-value="teacher">授课老师</li>
                                </ul>
                            </div>
                            <input id="search_keywords" class="fl" type="text" value="" placeholder="请输入搜索内容"/>
                            <img class="search_btn fr" id="jsSearchBtn" src="{% static 'images/search_btn.png' %}"/>
                        </div>
                    </div>
                </div>

                <nav>
                    <div class="nav">
                        <div class="wp">
                            <ul>
                                <li class="{% if request.path == '/' %}active{% endif %}">
                                    <a href="{% url 'index' %}">首页</a>
                                </li>
                                <li class="{% if request.path|slice:'7' == '/course' %}active{% endif %}">
                                    <a href="{% url 'course:course_list' %}">
                                        公开课<img class="hot" src="{% static 'images/nav_hot.png' %}">
                                    </a>
                                </li>
                                <li class="{% if request.path|slice:'12' == '/org/teacher' %}active{% endif %}">
                                    <a href="{% url 'org:teacher_list' %}">授课教师</a>
                                </li>
                                <li class="{% if request.path|slice:'9' == '/org/list' %}active{% endif %}">
                                    <a href="{% url 'org:org_list' %}">授课机构</a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </nav>
            {% endblock %}
            {# 搜索框与导航 #}
        </div>
    </header>
</section>

{# custom_bread #}
{% block custom_bread %}
    <section>
        <div class="wp">
            <ul class="crumbs">
                <li><a href="{% url 'index' %}">首页</a>></li>
                {% block custom_bread_tail %}{% endblock %}
            </ul>
        </div>
    </section>
{% endblock %}
{# custom_bread #}

{# content #}
{% block content %}{% endblock %}
{# content #}

{# footer #}
{% block footer %}
    <footer>
        <div class="footer">
            <div class="wp">
                <ul class="cont">
                    <li class="logo"><a href=""><img src="{% static 'images/footlogo.png' %}"/></a></li>
                    <li class="code"><img src="{% static 'images/code.jpg' %}"/>
                        <p class="center">扫描关注微信</p></li>
                    <li class="third"><img class="fl" src="{% static 'images/tell.png' %}"/>
                        <p class="tell">23333333</p>
                        <p class="time">周一至周日 9:00-18:00</p></li>
                </ul>

            </div>
            <p class="line"></p>
            <div class="wp clear">
                <span class="fl">2017 lighten.club Lighten-在线学习交流平台 保留所有权利</span>
                <span class="fr">copyright ? 2017 ICP备案证书号：蜀ICP备xxxxx号-1</span>
            </div>
        </div>
    </footer>
{% endblock %}
{# footer #}

{# sidebar #}
{% block sidebar %}
    <section>
    <ul class="sidebar">
        <li class="qq">
            <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=390930432&site=qq&menu=yes"></a>
        </li>
        <li class="totop"></li>
    </ul>
</section>
{% endblock %}
{# sidebar #}

{# dialog #}
{% block dialog %}{% endblock %}
{# dialog #}

{# all #}
<script src="{% static 'js/selectUi.js' %}" type='text/javascript'></script>
<script src="{% static 'js/deco-common.js' %}" type='text/javascript'></script>
<script src="{% static 'js/plugins/laydate/laydate.js' %}" type="text/javascript"></script>
<script src="{% static 'js/plugins/layer/layer.js' %}"></script>
<script src="{% static 'js/plugins/queryCity/js/public.js' %}" type="text/javascript"></script>
<script src="{% static 'js/unslider.js' %}" type="text/javascript"></script>
<script src="{% static 'js/plugins/jquery.scrollLoading.js' %}" type="text/javascript"></script>
<script src="{% static 'js/deco-common.js' %}" type="text/javascript"></script>
<script src="{% static 'js/plugins/jquery.raty.js' %}" type="text/javascript"></script>

{# custom_js #}
{% block custom_js %}{% endblock %}
{# custom_js #}

</body>

</html>
